package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * PcPurchaseOrderItem generated by hbm2java
 */
@Entity
@Table(name="pc_purchase_order_item"
    ,catalog="ncsc_erp"
)
public class PcPurchaseOrderItem  implements java.io.Serializable {


     private PcPurchaseOrderItemId id;
     private SysUom sysUom;
     private MmItem mmItem;
     private PcPurchaseOrder pcPurchaseOrder;
     private String poSupplierItemCode;
     private String poItemCode;
     private String poItemDescr;
     private BigDecimal poQty;
     private BigDecimal poPpu;
     private short poStatusIncVat;
     private BigDecimal poVatPercVal;
     private BigDecimal poVatVal;
     private BigDecimal poTotalPriceExcVat;
     private BigDecimal poTotalPrice;

    public PcPurchaseOrderItem() {
    }

	
    public PcPurchaseOrderItem(PcPurchaseOrderItemId id, PcPurchaseOrder pcPurchaseOrder, BigDecimal poQty, BigDecimal poPpu, short poStatusIncVat, BigDecimal poVatPercVal, BigDecimal poVatVal, BigDecimal poTotalPriceExcVat, BigDecimal poTotalPrice) {
        this.id = id;
        this.pcPurchaseOrder = pcPurchaseOrder;
        this.poQty = poQty;
        this.poPpu = poPpu;
        this.poStatusIncVat = poStatusIncVat;
        this.poVatPercVal = poVatPercVal;
        this.poVatVal = poVatVal;
        this.poTotalPriceExcVat = poTotalPriceExcVat;
        this.poTotalPrice = poTotalPrice;
    }
    public PcPurchaseOrderItem(PcPurchaseOrderItemId id, SysUom sysUom, MmItem mmItem, PcPurchaseOrder pcPurchaseOrder, String poSupplierItemCode, String poItemCode, String poItemDescr, BigDecimal poQty, BigDecimal poPpu, short poStatusIncVat, BigDecimal poVatPercVal, BigDecimal poVatVal, BigDecimal poTotalPriceExcVat, BigDecimal poTotalPrice) {
       this.id = id;
       this.sysUom = sysUom;
       this.mmItem = mmItem;
       this.pcPurchaseOrder = pcPurchaseOrder;
       this.poSupplierItemCode = poSupplierItemCode;
       this.poItemCode = poItemCode;
       this.poItemDescr = poItemDescr;
       this.poQty = poQty;
       this.poPpu = poPpu;
       this.poStatusIncVat = poStatusIncVat;
       this.poVatPercVal = poVatPercVal;
       this.poVatVal = poVatVal;
       this.poTotalPriceExcVat = poTotalPriceExcVat;
       this.poTotalPrice = poTotalPrice;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="poNo", column=@Column(name="PO_NO", nullable=false) ), 
        @AttributeOverride(name="poLineNo", column=@Column(name="PO_LINE_NO", nullable=false) ) } )
    public PcPurchaseOrderItemId getId() {
        return this.id;
    }
    
    public void setId(PcPurchaseOrderItemId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="PO_UOM_NO")
    public SysUom getSysUom() {
        return this.sysUom;
    }
    
    public void setSysUom(SysUom sysUom) {
        this.sysUom = sysUom;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="PO_ITEM_NO")
    public MmItem getMmItem() {
        return this.mmItem;
    }
    
    public void setMmItem(MmItem mmItem) {
        this.mmItem = mmItem;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="PO_NO", nullable=false, insertable=false, updatable=false)
    public PcPurchaseOrder getPcPurchaseOrder() {
        return this.pcPurchaseOrder;
    }
    
    public void setPcPurchaseOrder(PcPurchaseOrder pcPurchaseOrder) {
        this.pcPurchaseOrder = pcPurchaseOrder;
    }

    
    @Column(name="PO_SUPPLIER_ITEM_CODE", length=50)
    public String getPoSupplierItemCode() {
        return this.poSupplierItemCode;
    }
    
    public void setPoSupplierItemCode(String poSupplierItemCode) {
        this.poSupplierItemCode = poSupplierItemCode;
    }

    
    @Column(name="PO_ITEM_CODE", length=50)
    public String getPoItemCode() {
        return this.poItemCode;
    }
    
    public void setPoItemCode(String poItemCode) {
        this.poItemCode = poItemCode;
    }

    
    @Column(name="PO_ITEM_DESCR", length=300)
    public String getPoItemDescr() {
        return this.poItemDescr;
    }
    
    public void setPoItemDescr(String poItemDescr) {
        this.poItemDescr = poItemDescr;
    }

    
    @Column(name="PO_QTY", nullable=false, precision=10)
    public BigDecimal getPoQty() {
        return this.poQty;
    }
    
    public void setPoQty(BigDecimal poQty) {
        this.poQty = poQty;
    }

    
    @Column(name="PO_PPU", nullable=false, precision=10)
    public BigDecimal getPoPpu() {
        return this.poPpu;
    }
    
    public void setPoPpu(BigDecimal poPpu) {
        this.poPpu = poPpu;
    }

    
    @Column(name="PO_STATUS_INC_VAT", nullable=false)
    public short getPoStatusIncVat() {
        return this.poStatusIncVat;
    }
    
    public void setPoStatusIncVat(short poStatusIncVat) {
        this.poStatusIncVat = poStatusIncVat;
    }

    
    @Column(name="PO_VAT_PERC_VAL", nullable=false, precision=10)
    public BigDecimal getPoVatPercVal() {
        return this.poVatPercVal;
    }
    
    public void setPoVatPercVal(BigDecimal poVatPercVal) {
        this.poVatPercVal = poVatPercVal;
    }

    
    @Column(name="PO_VAT_VAL", nullable=false, precision=15)
    public BigDecimal getPoVatVal() {
        return this.poVatVal;
    }
    
    public void setPoVatVal(BigDecimal poVatVal) {
        this.poVatVal = poVatVal;
    }

    
    @Column(name="PO_TOTAL_PRICE_EXC_VAT", nullable=false, precision=15)
    public BigDecimal getPoTotalPriceExcVat() {
        return this.poTotalPriceExcVat;
    }
    
    public void setPoTotalPriceExcVat(BigDecimal poTotalPriceExcVat) {
        this.poTotalPriceExcVat = poTotalPriceExcVat;
    }

    
    @Column(name="PO_TOTAL_PRICE", nullable=false, precision=15)
    public BigDecimal getPoTotalPrice() {
        return this.poTotalPrice;
    }
    
    public void setPoTotalPrice(BigDecimal poTotalPrice) {
        this.poTotalPrice = poTotalPrice;
    }




}


